package com.ligenwen.zuoye.tools;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class ErrorHandler {
    //捕获异常
    @ExceptionHandler(value = Exception.class)
    public String errorHandler(Exception ex){
        return "404.html";
    }
}
